namespace learn
{
    public static class Logger
    {

        public static Action<string>? WriteMessage;

        public static Severity severity { get; set; } = Severity.Error;
        public static void LogMessage(Severity s, string message)
        {
if(s<severity)
            {
                return;
            }
            var outputMessage = $"{DateTime.Now} - {message} -{severity}";
            if (WriteMessage != null)
            {
                WriteMessage(message);
            }

        }

    }
}